#ifndef FCL_STATE_VALIDITY_CHECKER_COUNTER_H
#define FCL_STATE_VALIDITY_CHECKER_COUNTER_H

#include "omplapp/geometry/detail/FCLStateValidityChecker.h"
#include "IValidityCheckCount.h"

template<ompl::app::MotionModel T>
class FCLStateValidityCheckerCounter : public ompl::app::FCLStateValidityChecker<T>, public IValidityCheckCount
{
public:
	FCLStateValidityCheckerCounter(const ompl::base::SpaceInformationPtr &si, const ompl::app::GeometrySpecification &geom,
		const ompl::app::GeometricStateExtractor &se, bool selfCollision)
	:  ompl::app::FCLStateValidityChecker<T>(si, geom, se, selfCollision)
	{
	}

	virtual ~FCLStateValidityCheckerCounter()
	{
	}

	virtual bool isValid (const ob::State *state) const
    {
		++uiNumValidityChecks_;
		return ompl::app::FCLStateValidityChecker<T>::isValid(state);
    }
};

#endif